package at.fhooe.pandora.views;

import at.fhooe.engine.pandora.Game;
import at.fhooe.engine.scenegraph.SceneNode;
import at.fhooe.engine.state.StateDataObject;
import at.fhooe.engine.view.View;
import at.fhooe.engine.visuals.TextVisual;

public class MenuView implements View {
	
	public void engage() {
		SceneNode menuViewHeader = Game.getInstance().getSceneNodeManager().createSceneNode("menuViewHeader");
		if (menuViewHeader != null) {
			menuViewHeader.transform(350, 50, 0.0);
			menuViewHeader.setVisual(new TextVisual("MENU"));
		}
		
		SceneNode menuTextNode1 = Game.getInstance().getSceneNodeManager().createSceneNode("menuTextNode1");
		if (menuTextNode1 != null) {
			menuTextNode1.transform(350, 150, 0.0);
			menuTextNode1.setVisual(new TextVisual("Press ENTER to play"));
		}
		
		SceneNode menuTextNode2 = Game.getInstance().getSceneNodeManager().createSceneNode("menuTextNode2");
		if (menuTextNode2 != null) {
			menuTextNode2.transform(350, 250, 0.0);
			menuTextNode2.setVisual(new TextVisual("Press ESCAPE to exit"));
		}
	}
	
	public void engage(StateDataObject data) {
		engage();
	}
	
	public void disengage() {
		Game.getInstance().getSceneNodeManager().destroyAllSceneNodes();
	}

}
